package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])

load("@tink_java//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")

java_library(
    name = "cli_util",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/CliUtil.java",
    ],
    javacopts = JAVACOPTS_OSS,
    deps = [
        "@tink_java//:testonly",
    ],
)

java_library(
    name = "compare_keysets",
    testonly = 1,
    srcs = ["java/com/google/crypto/tink/testing/CompareKeysets.java"],
    javacopts = JAVACOPTS_OSS,
    deps = [
        "@tink_java//src/main/java/com/google/crypto/tink:privileged_registry",
        "@tink_java//proto:tink_java_proto",
    ],
)

java_binary(
    name = "compare_keysets_cli_java",
    testonly = 1,
    srcs = ["java/com/google/crypto/tink/testing/CompareKeysetsCli.java"],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.CompareKeysetsCli",
    deps = [
        ":cli_util",
        ":compare_keysets",
        "@tink_java//:cleartext_keyset_handle",
        "@tink_java//src/main/java/com/google/crypto/tink:core",
        "@tink_java//src/main/java/com/google/crypto/tink/config",
    ],
)

java_binary(
    name = "version_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/VersionCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.VersionCli",
    deps = [
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "aead_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/AeadCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.AeadCli",
    deps = [
        ":cli_util",
        "@tink_java//:awskms",
        "@tink_java//:gcpkms",
        "@tink_java//:testonly",
        "@tink_java//:testutil",
        "@tink_java//src/main/java/com/google/crypto/tink",
        "@tink_java//src/main/java/com/google/crypto/tink/aead",
    ],
)

java_binary(
    name = "deterministic_aead_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/DeterministicAeadCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.DeterministicAeadCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "streaming_aead_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/StreamingAeadCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.StreamingAeadCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "mac_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/MacCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.MacCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "hybrid_encrypt_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/HybridEncryptCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.HybridEncryptCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "hybrid_decrypt_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/HybridDecryptCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.HybridDecryptCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "public_key_sign_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/PublicKeySignCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.PublicKeySignCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)

java_binary(
    name = "public_key_verify_cli_java",
    testonly = 1,
    srcs = [
        "java/com/google/crypto/tink/testing/PublicKeyVerifyCli.java",
    ],
    javacopts = JAVACOPTS_OSS,
    main_class = "com.google.crypto.tink.testing.PublicKeyVerifyCli",
    deps = [
        ":cli_util",
        "@tink_java//:testonly",
    ],
)
